package com.xmy.api.feign;

import com.xmy.entity.Result;
import com.xmy.pojo.ShopGoods;
import com.xmy.pojo.ShopOrderGoodsLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import javax.websocket.server.PathParam;

@Component
@FeignClient("dubbo-goods-provider")
public interface IGoodsFeignService {
    @GetMapping("/goods/{id}")
    ShopGoods findOne(@PathVariable("id") Long id);

    @GetMapping("/goods/reduceGoodsNum")
    Result reduceGoodsNum(@RequestBody ShopOrderGoodsLog orderGoodsLog);
}
